Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Resize can erase Objects #1032

Closed
Chaoseiro opened this issue Jul 19, 2015 · 12 comments

Comments

Projects
None yet
3 participants
@Chaoseiro
Copy link

commented Jul 19, 2015

So, it's not really a Bug, just an implementation that I believe is too harsh on the user. Currently, when you resize a map to a smaller width or height, any Object that would stay off-map limits is erased.
I believe a better implementation would be to or leave the objects on their original position, off-limits, or move them inside the map's new limits.

Why that? Well, at least in my case, I have one base map with all objects and properties set, and whenever I'll design a new level, I just resize this base map. The problem is when the new map is smaller than this base, since when the map is resized, any object that would stay off-limits is erased.

I can undo and move the desired objects inside the new map's dimension, and of course I could leave all objects at (0,0), so this problem would not happen.

But I believe that the current implementation can be frustrating sometimes, since there's not even a warning "Some objects will be erased, proceed?".

Here are two images to demonstrate this behavior, see the Door object layer hierarchy:
Base Map (12x6 tiles):
basemap

Base Map Resized (8x12 tiles):
basemapresized

Pull Request #877 can solve this, since I won't need this base map anymore, but maybe that warning message would not hurt :P

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2015

Instead of adding a warning message, maybe there should be a checkbox saying something like "Delete objects outside of map boundaries", to make this behavior more explicit as well as optional?

@Chaoseiro

This comment has been minimized.

Copy link
Author

commented Jul 19, 2015

Having this option would be great, since this behavior is hidden from the user until he tries it.

@IMMZ

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2016

@bjorn Hi bro! I'm ready to implement this such way => Show message box after resize map dialog 'Do you want to remove objects which are outside of map?' With 'Yes/No' buttons and appropriate behavior. 'Crop to selection' will remove all objects without any messages. I think the last one function is used when user decided to drop all the things which is not in his selection area. Would it be enough? Any corrections, offers?

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2016

@IMMZ Why an additional dialog instead of a checkbox like I suggested in my last comment?

@IMMZ

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2016

@bjorn, I thing the msgbox would be much noticeable but it's nothing more than my opinion. That could be the checkbox.

  1. Where I can should place the checkbox? To resize map dialog?
  2. Should it's state be stored between dialog's reopenings or every time the state is %default_state%?
  3. What is %default_state%? checked or unchecked?
@bjorn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2016

  1. Yes, in the resize map dialog. One problem here is probably, that there is no "map resize dialog". There is only a "resize dialog" which is somewhat more general purpose. So possibly extending it with a checkbox should be optional.

  2. Default to the last used state, so store in preferences. See for example how the NewMapDialog does this.

  3. Default to remove the objects.

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2016

@IMMZ Regarding your question on IRC, feel free to just add that checkbox to the resizedialog.ui for now. When we re-use this dialog for resizing something else than a map later (for example, just a layer), we can add some code that hides it.

@IMMZ

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2016

@bjorn, ok, thanks. Then I think I can start to implement that.
P.S. What about last words at #930 ? Is that task still active or not?

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2016

@IMMZ Sure, the command-line tools could still be made translatable.

@IMMZ

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2016

@bjorn, ok that will be the 2nd target since my disappearing

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2016

@IMMZ Alright. Nice to see you back, btw!

@IMMZ

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2016

@bjorn thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.