logic: scroll code when no symbol
Scrolling to line, when comming from plugin and the file is was modified. Since there we dont know from the position data if the symbol on position is the right one, we scroll to the line if modified.
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
class MessageActivateFile: public Message<MessageActivateFile>
|
||||
{
|
||||
public:
|
||||
MessageActivateFile(const FilePath& filePath)
|
||||
MessageActivateFile(const FilePath& filePath, unsigned int line = 0)
|
||||
: filePath(filePath)
|
||||
, line(line)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -23,6 +24,7 @@ public:
|
||||
}
|
||||
|
||||
const FilePath filePath;
|
||||
unsigned int line;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_ACTIVATE_FILE_H
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef MESSAGE_SCROLL_TO_LINE_h
|
||||
#define MESSAGE_SCROLL_TO_LINE_h
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageScrollToLine
|
||||
: public Message<MessageScrollToLine>
|
||||
{
|
||||
public:
|
||||
MessageScrollToLine(std::string filename, unsigned int line, bool isModified = false)
|
||||
: filename(filename)
|
||||
, line(line)
|
||||
, isModified(isModified)
|
||||
{
|
||||
setIsLogged(false);
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageScrollToLine";
|
||||
}
|
||||
|
||||
std::string filename;
|
||||
unsigned int line;
|
||||
bool isModified;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_SCROLL_TO_LINE_h
|
||||
Reference in New Issue
Block a user