diff --git a/CMakeLists.txt b/CMakeLists.txt index baa5eac..9b2bef5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake project(qad) set(qad_MAJOR 1) set(qad_MINOR 14) -set(qad_REVISION 1) +set(qad_REVISION 2) set(qad_SUFFIX ) set(qad_COMPANY SHS) set(qad_DOMAIN org.SHS) diff --git a/libs/application/historyview.cpp b/libs/application/historyview.cpp index 1be0263..11375d0 100644 --- a/libs/application/historyview.cpp +++ b/libs/application/historyview.cpp @@ -1,4 +1,5 @@ #include "historyview.h" +#include #include @@ -117,6 +118,7 @@ void HistoryView::itemSelectionChanged() { if (!active_) return; if (index < 1) index = 1; //qDebug() << "changed" << count(); + int vpos = verticalScrollBar()->value(); blockSignals(true); setCurrentItem(item(index - 1)); for (int i = 0; i < index; ++i) @@ -124,6 +126,7 @@ void HistoryView::itemSelectionChanged() { for (int i = index; i < count(); ++i) item(i)->setSelected(false); blockSignals(false); + verticalScrollBar()->setValue(vpos); emit redoAvailable(index < count()); emit undoAvailable((index > 1)); }