From 9200ed0568719fc3ffbf9c1f2fd07a667097b875 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 26 May 2008 07:08:59 +0000 Subject: [FIX] Recent files now works [FIX] Various UI fixes [FIX] Scripts are now escaped correctly in the XML git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@176 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemodr/MapUI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pokemodr/MapUI.cpp') diff --git a/pokemodr/MapUI.cpp b/pokemodr/MapUI.cpp index 39d349ef..3314746d 100644 --- a/pokemodr/MapUI.cpp +++ b/pokemodr/MapUI.cpp @@ -39,7 +39,7 @@ MapUI::MapUI(Map* map, QWidget* parent) : { setupUi(this); setObjects(map, new Map(*map)); - m_model = new TilemapModel(this, static_cast(modified())->map(), static_cast(original()->pokemod())); + m_model = new TilemapModel(this, static_cast(modified())->map(), pokemod()); } MapUI::~MapUI() @@ -94,7 +94,9 @@ void MapUI::discard() void MapUI::on_varName_textChanged(const QString& name) { + const int cursor = varName->cursorPosition(); static_cast(modified())->setName(name); + varName->setCursorPosition(cursor); } void MapUI::on_boxFlyWarp_toggled() -- cgit