File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 2222#define _CONFIG_H
2323
2424#define PROGRAM_NAME "PICO SST39sf0x0 Programmer"
25- #define PROGRAM_VERSION "1.5.0 "
25+ #define PROGRAM_VERSION "1.5.1 "
2626#define UNUSED (x ) (void)(x)
2727
2828#endif // _CONFIG_H
Original file line number Diff line number Diff line change @@ -28,20 +28,30 @@ HexViewWidget::HexViewWidget(QWidget *parent)
2828 : QAbstractScrollArea{parent} {
2929}
3030
31+ /* *
32+ * @brief set data for the HexView class to display
33+ * @param _data data to display
34+ */
35+ void HexViewWidget::set_data (const QByteArray& _data) {
36+ QMutexLocker locker (&this ->lock );
37+ this ->data = _data;
38+ this ->viewport ()->update ();
39+ }
40+
3141/* *
3242 * @brief Draw the contents of the HexViewer widget
3343 * @param event
3444 */
3545void HexViewWidget::paintEvent (QPaintEvent *event) {
36- QMutexLocker (&this ->lock );
46+ QMutexLocker locker (&this ->lock );
3747
3848 this ->update_positions ();
3949
4050 QPainter painter (viewport ());
4151 QSize area_size = viewport ()->size ();
4252 QSize widget_size = this ->get_widget_size ();
4353 this ->verticalScrollBar ()->setPageStep (area_size.height () / charheight);
44- this ->verticalScrollBar ()->setRange (0 , (widget_size.height () - area_size.height ()) / charheight + 1 );
54+ this ->verticalScrollBar ()->setRange (0 , (widget_size.height () - area_size.height ()) / charheight + 2 );
4555
4656 // grab colors
4757 settings.sync ();
Original file line number Diff line number Diff line change @@ -70,11 +70,7 @@ class HexViewWidget : public QAbstractScrollArea
7070 * @brief set data for the HexView class to display
7171 * @param _data data to display
7272 */
73- void set_data (const QByteArray& _data) {
74- QMutexLocker (&this ->lock );
75- this ->data = _data;
76- this ->viewport ()->update ();
77- }
73+ void set_data (const QByteArray& _data);
7874
7975 /* *
8076 * @brief Grab data from HexViewer class
You can’t perform that action at this time.
0 commit comments