|
@@ -14,6 +14,7 @@
|
|
|
#include <core/vnotex.h>
|
|
#include <core/vnotex.h>
|
|
|
#include <core/thememgr.h>
|
|
#include <core/thememgr.h>
|
|
|
#include "editors/statuswidget.h"
|
|
#include "editors/statuswidget.h"
|
|
|
|
|
+#include <core/fileopenparameters.h>
|
|
|
|
|
|
|
|
using namespace vnotex;
|
|
using namespace vnotex;
|
|
|
|
|
|
|
@@ -76,6 +77,8 @@ void TextViewWindow::handleBufferChangedInternal(const QSharedPointer<FileOpenPa
|
|
|
{
|
|
{
|
|
|
Q_UNUSED(p_paras);
|
|
Q_UNUSED(p_paras);
|
|
|
TextViewWindowHelper::handleBufferChanged(this);
|
|
TextViewWindowHelper::handleBufferChanged(this);
|
|
|
|
|
+
|
|
|
|
|
+ handleFileOpenParameters(p_paras);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void TextViewWindow::syncEditorFromBuffer()
|
|
void TextViewWindow::syncEditorFromBuffer()
|
|
@@ -215,3 +218,19 @@ void TextViewWindow::updateEditorFromConfig()
|
|
|
m_editor->zoom(textEditorConfig.getZoomDelta());
|
|
m_editor->zoom(textEditorConfig.getZoomDelta());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+void TextViewWindow::openTwice(const QSharedPointer<FileOpenParameters> &p_paras)
|
|
|
|
|
+{
|
|
|
|
|
+ handleFileOpenParameters(p_paras);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void TextViewWindow::handleFileOpenParameters(const QSharedPointer<FileOpenParameters> &p_paras)
|
|
|
|
|
+{
|
|
|
|
|
+ if (!p_paras) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (p_paras->m_lineNumber > -1) {
|
|
|
|
|
+ m_editor->scrollToLine(p_paras->m_lineNumber, true);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|